﻿<%@ Page Title="主页" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeBehind="Default.aspx.cs" Inherits="TestWeb._Default" %>

<asp:Content ID="HeaderContent" runat="server" ContentPlaceHolderID="HeadContent">
</asp:Content>
<asp:Content ID="BodyContent" runat="server" ContentPlaceHolderID="MainContent">

   <script src="Scripts/jquery-1.4.1.js" type="text/javascript"></script>

    <script type="text/javascript">

        $(function () {
            var datas = new Object();
            datas.Parms = new Array();
            datas.Parms[0] = "5BA61509-9168-E311-9F73-00155D14DE06"; //"8C6D7561-4715-E311-9BBA-00155D141823"; //
            datas.Parms[1] = 333; //"8C6D7561-4715-E311-9BBA-00155D141823"; //

            datas.RequestName = "customTest2";

            datas = window.JSON.stringify(datas);
            $.ajax({
                async: false,
                type: "Post",
                contentType: "application/json;charset=utf-8",
                dataType: "json",
                url: '/springservice?op=GetListRequest',
                data: datas,
                success: function (data) {
                    if (data.returnValue == true) {
                        var responseData = data.MainData;
                        for (var i = 0; i < responseData.length; i++) {
                            var item = responseData[i];
                            var table = document.getElementById("ShowTable");
                            // 添加行
                            var newTR = table.insertRow(table.rows.length);
                            var rowID = table.rows.length;
                            newTR.id = "Row_" + rowID;

                            var epm_prepareprofiletax = newTR.insertCell(0);
                            epm_prepareprofiletax.innerHTML = item.epm_prepareprofiletax;

                            var epm_aftertaxrate = newTR.insertCell(1);
                            epm_aftertaxrate.innerHTML = item.epm_aftertaxrate;     
                                                   
                            var epm_aftertaxrateinner = newTR.insertCell(2);
                            epm_aftertaxrateinner.innerHTML = item.epm_aftertaxrateinner;
                             
                            var cc = newTR.insertCell(3);
                            cc.innerHTML = item.cc;                                                          
                        }
                    }
                    else {
                        alert('错误：' + data.message);
                    }
                },
                error: function (data) {
                    alert("errorText:" + data.message);
                }
            });

        });
        </script>

        <table id="ShowTable"></table>
</asp:Content>
